/*
 * Android Runner is a multiplayer GPS game fully written by Xurxo Mendez Perez
 * 
 * Copyright (C) 2009 Xurxo Mendez Perez
 *   
 * This file is part of Android Runner.
 * 
 * Android Runner is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Android Runner is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Android Runner.  If not, see <http://www.gnu.org/licenses/>.
 */

package es.sonxurxo.androidrunner.model.persistence.item.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;


/**
 * 
 * @author "Xurxo Mendez Perez"
 *
 */
@Entity
public class QuestionData implements Serializable {

	private static final long serialVersionUID = -6089705341533503436L;

	private long questionDataId;
	private String question;
	private String option1;
	private String option2;
	private String option3;
	private int answer;
	
	public QuestionData() {
		// Empty on purpose
	}

	public QuestionData(String question, String option1, String option2,
			String option3, int answer) {
		super();
		this.question = question;
		this.option1 = option1;
		this.option2 = option2;
		this.option3 = option3;
		this.answer = answer;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO,
            generator="QuestionDataIdGenerator")
    @SequenceGenerator(             // It only takes effect for
            name="QuestionDataIdGenerator", // databases providing identifier
            sequenceName="QuestionDataSeq") // generators.
	public long getQuestionDataId() {
		return this.questionDataId;
	}

	public void setQuestionDataId(long questionDataId) {
		this.questionDataId = questionDataId;
	}

	public String getQuestion() {
		return this.question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public String getOption1() {
		return this.option1;
	}

	public void setOption1(String option1) {
		this.option1 = option1;
	}

	public String getOption2() {
		return this.option2;
	}

	public void setOption2(String option2) {
		this.option2 = option2;
	}

	public String getOption3() {
		return this.option3;
	}

	public void setOption3(String option3) {
		this.option3 = option3;
	}

	public int getAnswer() {
		return this.answer;
	}

	public void setAnswer(int answer) {
		this.answer = answer;
	}
}
